class animal{
    protected String name;
    public animal(String name){
        this.name = name;
    }
    public void eat(){
        System.out.println(name+"正在吃东西");
    }
}
class dog extends animal{
    public dog(String name){
        super(name);
    }
    public void bark(){
        System.out.println(name+"正在大叫");
    }
}

public class text {
    public static void main(String[] args) {
        dog dog1=new dog("小白");
                dog1.bark();
                dog1.eat();
    }
}
